package com.rongshu.view.discovery.activity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.FrameLayout;

import com.rongshu.R;
import com.rongshu.utils.Constant;
import com.rongshu.view.base.BaseActivity;
import com.rongshu.view.discovery.fragment.TaArticleFragment;
import com.rongshu.view.discovery.fragment.TaPostFragment;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * created by zhengweis on 2018/12/18.
 * description：
 */
public class UserArticleActivity extends BaseActivity {


    @BindView(R.id.content)
    FrameLayout content;
    private int type;

    @Override
    protected int initLayout() {
        return R.layout.activity_penpal_will_view;
    }

    @Override
    protected void initView() {
        Intent intent = getIntent();
        if (intent != null) {
            type = intent.getIntExtra(Constant.INTENT_TYPE, 0);
        }
        if (type == Constant.ARTICLE) {
            replaceFragment(TaArticleFragment.class, TaArticleFragment.class.getSimpleName(), R.id.content, null, null);
        } else if (type == Constant.POST) {
            replaceFragment(TaPostFragment.class, TaPostFragment.class.getSimpleName(), R.id.content, null, null);
        }
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void updateViews(boolean isRefresh) {

    }


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }
}
